import http from '../../utils/request'
//图书查询接口
export const getSupplierPageData =(params) =>{
    return http.get('/supplier',
        {params}).then(reponse =>{
        return reponse.data.supplierPaasPage;
    }).catch(error => {
        console.error(error);
    });
}

export const delSupplier =(params) =>{
    var id = params.id;
    return http.post('/supplier/d/'+id).then(response =>{
        return response;
    })
}

export const addSupplier =(params) =>{
    return http.post('/supplier',params).then(response =>{
        return response;
    })
}
export const getSupplierListData =(params) =>{
    return http.get('/supplier/list',
        {params}).then(reponse =>{
        return reponse.data.supplierList;
    }).catch(error => {
        console.error(error);
    });
}